<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>
<!DOCTYPE html>

<html>
<head>
    <%@include file="/WEB-INF/views/layout/miiteen/base.ref.jsp" %>
</head>
<body>
<div class="mainpage list">
    <!--顶部菜单-->
    <div class="page-topmenu">
        <div class="btn-panel">
            <el-button type="primary" size="small" icon="el-icon-plus" @click="add">添加</el-button>
        </div>
        <div class="btn-panel">
            <el-button size="small" icon="el-icon-delete" @click="del">删除</el-button>
        </div>
    </div>
    <!--查询条件-->
    <el-form :inline="true" :model="form" size="small">

        <!--视业务进行更改-begin-->
        <el-form-item label="工号">
            <el-input v-model="form.jobNo" placeholder="工号"></el-input>
        </el-form-item>
        <el-form-item label="姓名">
            <el-input v-model="form.trueName" placeholder="姓名"></el-input>
        </el-form-item>
        <!--视业务进行更改-end-->

        <el-form-item>
            <el-button type="primary" @click="search">查询</el-button>
        </el-form-item>
    </el-form>
    <hr/>
    <el-table
            row-key="id"
            :data="grid.data"
            :height="grid.height"
            @selection-change="selectchange">
        <el-table-column
                type="selection"
                width="55">
        </el-table-column>
        <el-table-column prop="name" label="操作" width="100">
            <template slot-scope="scope">
                <%-- <a @click="goview(scope.row.id)" class="grid-operate">查看</a>--%>
                <a @click="goedit(scope.row.id)" class="grid-operate">编辑</a>
            </template>
        </el-table-column>

        <!--视业务进行更改-begin-->
        <el-table-column prop="account" label="账号"></el-table-column>
        <el-table-column prop="jobNo" label="工号"></el-table-column>
        <el-table-column prop="trueName" label="姓名"></el-table-column>
        <el-table-column prop="sex" label="性别">
            <template slot-scope="scope">
                {{scope.row.sex == 1 ? "男" : scope.row.sex == 2 ? "女" : "未知"}}
            </template>
        </el-table-column>
        <el-table-column prop="deptName" label="部门"></el-table-column>
        <el-table-column prop="phone" label="手机"></el-table-column>
        <el-table-column prop="email" label="邮箱"></el-table-column>
        <!--视业务进行更改-end-->

    </el-table>
    <!--分页控件-->
    <%@include file="/WEB-INF/views/layout/miiteen/gridpage.ref.jsp" %>
</div>
<script>
    //初始化数据，必须放置在列表页面封装部分前
    function initVueOption(obj) {
        //设置控制器
        obj.data.controller = "${ctx}/user/useruserinfo";
        //设置查询条件默认值
        obj.data.form = {
            jobNo: "",
            trueName: ""
        }
    }
</script>
<!--列表页面封装部分-->
<%@include file="/WEB-INF/views/layout/miiteen/page.list.ref.jsp" %>
</body>
</html>